package com.is.add.controller.vo;

import com.is.add.model.Deposit;
import com.is.add.util.VoUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * 备用金余额
 * Created by jackie on 2016/9/6.
 */
public class DepositBalanceVO {
    private Long    shopId;                                 //场馆ID
    private String  shopCode;                               //场馆编号
    private String  shopName;                               //场馆名称
    private Double  balance;                                //余额
    private String  depositType;                            //备用金类型

    public static DepositBalanceVO generateBy(Deposit deposit){
        DepositBalanceVO depositBalanceVO = VoUtil.copyBasic(DepositBalanceVO.class, deposit);
        assert depositBalanceVO != null;
        if (deposit.getDepositType() == 1){
            depositBalanceVO.setDepositType("真实");
        }else {
            depositBalanceVO.setDepositType("虚拟");
        }
        return depositBalanceVO;
    }
    public static List<DepositBalanceVO> generateBy(List<Deposit> depositList){
        List<DepositBalanceVO> list= new ArrayList<>();
        for (Deposit deposit:depositList){
            list.add(generateBy(deposit));
        }
        return list;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public String getShopCode() {
        return shopCode;
    }

    public void setShopCode(String shopCode) {
        this.shopCode = shopCode;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Double getBalance() {
        return balance;
    }

    public void setBalance(Double balance) {
        this.balance = balance;
    }

    public String getDepositType() {
        return depositType;
    }

    public void setDepositType(String depositType) {
        this.depositType = depositType;
    }
}
